package demo;

public class TryDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try {
            String str = "123";
            System.out.println(Integer.parseInt(str));
        }catch (NumberFormatException e){
            System.out.println("出现了异常");
        }
        System.out.println("程序结束了");
    }
}
